/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package incredulousmachine;

import com.sun.j3d.audioengines.javasound.JavaSoundMixer;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Line;
import javazoom.jl.decoder.Decoder;
import javazoom.jl.decoder.Equalizer;
import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.player.AudioDevice;
import javazoom.jl.player.JavaSoundAudioDevice;
import javazoom.jl.player.JavaSoundAudioDeviceFactory;
import javazoom.jl.player.Player;
import javazoom.jl.player.advanced.jlap;
import javazoom.jl.player.jlp;
import javazoom.jlgui.basicplayer.BasicPlayer;
import javazoom.jlgui.basicplayer.BasicPlayerException;

/**
 *
 * @author tomase
 */
public class SoundTest {

    public static void main(String[] args) {
        File currentDir = new File(".");
        File parentDir = new File("..");

        try {
            System.out.println("Current directory: " + currentDir.getCanonicalPath());
            System.out.println("Parent directory:" + parentDir.getCanonicalPath());
        } catch (IOException e) {
            Logger.getLogger(SoundTest.class.getName()).log(Level.SEVERE, null, e);
        }

        try {
            File song = new File("bin/snd/music/cdk_-_Good_Bye_Mr._Rogers.mp3");
            BasicPlayer player = new BasicPlayer();
            
            player.open(song);
            
            player.play();
            
        } catch (BasicPlayerException ex) {
            Logger.getLogger(SoundTest.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
